var t = require;
var e = module;
var o = exports;
var a,
    i =
        (this && this.__extends) ||
        ((a = function (t, e) {
            return (a =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (t, e) {
                        t.__proto__ = e;
                    }) ||
                function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                })(t, e);
        }),
        function (t, e) {
            a(t, e);
            function o() {
                this.constructor = t;
            }
            t.prototype = null === e ? Object.create(e) : ((o.prototype = e.prototype), new o());
        }),
    n =
        (this && this.__decorate) ||
        function (t, e, o, a) {
            var i,
                n = arguments.length,
                r = n < 3 ? e : null === a ? (a = Object.getOwnPropertyDescriptor(e, o)) : a;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, a);
            else
                for (var s = t.length - 1; s >= 0; s--)
                    (i = t[s]) && (r = (n < 3 ? i(r) : n > 3 ? i(e, o, r) : i(e, o)) || r);
            return n > 3 && r && Object.defineProperty(e, o, r), r;
        };
Object.defineProperty(o, "__esModule", {value: !0});
var r = cc._decorator,
    s = r.ccclass,
    c = r.property,
    p =
        (r.menu,
        (function (t) {
            i(e, t);
            function e() {
                var e = (null !== t && t.apply(this, arguments)) || this;
                e.viewLab = null;
                e.moveNode = null;
                e.coinSprite = null;
                e.moveTime = 1;
                e.offPos = cc.v2(0, 100);
                return e;
            }
            e.prototype.onLoad = function () {};
            e.prototype.setSpriteView = function (t) {
                SpriteView.setRewardCoin(t, this.coinSprite);
            };
            e.prototype.play = function (t, e, o, a) {
                var i = this;
                void 0 === a && (a = 1);
                this.moveTime = a;
                this.viewLab.string = t;
                this.node.parent = o;
                e.y += this.offPos.y;
                this.node.setPosition(o.convertToNodeSpaceAR(e));
                this.moveNode.setPosition(cc.v2(0, -100));
                this.moveNode.opacity = 255;
                this.moveNode.runAction(
                    cc.sequence([
                        cc.spawn(
                            cc.moveTo(this.moveTime, cc.Vec2.ZERO).easing(cc.easeOut(3)),
                            cc.fadeOut(this.moveTime)
                        ),
                        cc.callFunc(function () {
                            QLooperNode.putNode(i.node);
                        }, this)
                    ])
                );
            };
            n([c(cc.Label)], e.prototype, "viewLab", void 0);
            n([c(cc.Node)], e.prototype, "moveNode", void 0);
            n([c(cc.Sprite)], e.prototype, "coinSprite", void 0);
            return n([s], e);
        })(cc.Component));
o.default = p;
